Constructor-Based Conditional Rewriting Logic is a general framework forintegrating first-order functional and logic programming which gives analgebraic semantics for non-deterministic functional-logic programs. In thecontext of this formalism, we introduce a simple notion of program module as anopen program which can be extended together with several mechanisms to combinethem. These mechanisms are based on a reduced set of operations. However, thehigh expressiveness of these operations enable us to model typical constructsfor program modularization like hiding, export/import,genericity/instantiation, and inheritance in a simple way. We also deal withthe semantic aspects of the proposal by introducing an immediate consequenceoperator, and studying several alternative semantics for a program module,based on this operator, in the line of logic programming: the operator itself,its least fixpoint (the least model of the module), the set of itspre-fixpoints (term models of the module), and some other variations in orderto find a compositional and fully abstract semantics wrt the set of operationsand a natural notion of observability.
展开▼